-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Utils] update_llc_test_checks.py: updated the regexp for ARM target #148287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-testing-tools Author: Tommaso Fellegara (Felle33) ChangesFixes #147485.
Should I fix also the Full diff: https://github.com/llvm/llvm-project/pull/148287.diff 1 Files Affected:
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 3754aa2eeba85..ee70d837d7b7a 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -32,7 +32,7 @@ class string:
)
ASM_FUNCTION_ARM_RE = re.compile(
- r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*@+[ \t]*@"?(?P=func)"?\n' # f: (name of function)
+ r'^(?P<func>[0-9a-zA-Z_$]+):[ \t]*(@+[ \t]*@"?(?P=func)"?)?\n' # f: (name of function)
r"(?:\.L(?P=func)\$local:\n)?" # drop .L<func>$local:
r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L<func>$local
r"\s+\.fnstart\n" # .fnstart
|
This is pretty common - the update script shouldn't touch comments outside functions so if the original CHECKS were put above the function then they won't get stripped and the lit test will fail as it ends up with duplicate checks - if a test file doesn't already have the "Assertions have been autogenerated by utils/update_llc_test_checks.py" note I wouldn't worry. |
I assume so. Currently travelling but will take a look when I can this week. I think I copied this from another target’s but it’s possible I had to edit it and botched that. |
|
Is there something I can do on my side? I could work on the AArch64 files, but I have not found a file that was updated with the script and the flag --asm-verbose=false was passed at the same time |
|
Can you update the other regex patterns that were updated in the same patch? |
|
Sorry, I was a little bit busy this week. I will try to tackle the issue in the next few days |
…TION_ARM_IOS_RE and ASM_FUNCTION_ARM_MACHO_RE
|
The only things that I have modified are:
I tested these regex with the ARM/ifcvt-iter-indbr.ll, ARM/atomic-cmpxchg.ll and AArch64/arm64-arith.ll |
|
@Felle33 please can you investigate the CI failures: |
|
Sure, unfortunately now I cannot do it, is it a problem if I will do it next week? |
RKSimon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@Felle33 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
|
@RKSimon - Thanks for the patience 😃 |
|
This change broke
But more too, I think. I was wondering what broke |
PR llvm#148287 removed the "\s*" before ".Lfunc_end" for AArch64, which broke `update_llc_test_checks.py` for a number of tests including: - `llvm/test/CodeGen/AArch64/sme-za-exceptions.ll` - `llvm/test/CodeGen/AArch64/win-sve.ll` This patch adds the "\s*" back.
@MacDue Sorry I missed this :/ |
PR #148287 removed the "\s*" before ".Lfunc_end" for AArch64, which broke `update_llc_test_checks.py` for a number of tests including: - `llvm/test/CodeGen/AArch64/sme-za-exceptions.ll` - `llvm/test/CodeGen/AArch64/win-sve.ll` This patch adds the "\s*" back.
Fixes #147485.
I changed the regexp for the ARM target making the part
@+[ \t]*@"?(?P=func)"?optional since when the -asm-verbose=false is passed it is not generated and this led to the issue.I have tried to use this new version with the tests that used the -asm-verbose=false, these are the results:
2009-08-21-PostRAKill2.ll,2009-08-21-PostRAKill3.ll: runtime error (UnboundLocalError), there was the same error also in the previous commit2011-02-04-AntidepMultidef.ll,2011-02-07-AntidepClobber.ll,ifcvt-iter-indbr.ll: the update removes the file_check directivesarm-vld1.ll,arm-vlddup-update.ll,arm-vst1.ll,atomic-cmpxchg.ll,float-helpers.ll,fp16-fullfp16.ll: the update worksarm-vlddup.ll,tail-dup.ll,tail-opts.ll: adds some notes generated by update_llc_test_checks, but the update worksfp16-promote.ll,cse-flags.ll: in these files there are some file_checks directives outside the function and this leads to an error since the update script rewrites the directives inside the function.fp16-vld.ll: some spaces are added, but the update works.Should I fix also the
2011-02-04-AntidepMultidef.ll,2011-02-07-AntidepClobber.ll,ifcvt-iter-indbr.lltests?Moreover I did not found the aarch64 tests that you mentioned.